import React, { Component } from 'react'
import { withRouter } from 'react-router-dom'

class Header extends Component {
  render() {
    return (
      <div>
        <div className="page-header">
          <h2>React Router Demo</h2>
        </div>
      </div>
    )
  }
}

// withRouter可以加工一般组件，让一般组件具备路由组件所特有的API
// withRouter返回一个新组件
export default withRouter(Header)
